from pms.common.views import PostFormula
from project.models import ProjectCodeRepository
from project.utils.repository import repository_view


class API(PostFormula):

    def handle(self, req):
        repo_id = req['id']
        return self.success_respond(repository_view(
            repository=ProjectCodeRepository.objects.get(id=repo_id)
        ))
